<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"       
      xmlns:b="http://bootsfaces.net/ui">

  <ui:composition template="/template.xhtml">
    <ui:define name="title">
      <h:outputText value="#{bundle.ListPerfilesTitle}"></h:outputText>
    </ui:define>
    <ui:define name="body">
      <h:form styleClass="jsfcrud_list_form">
        <h:panelGroup id="messagePanel" layout="block">
          <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
        </h:panelGroup>
        <h:outputText escape="false" value="#{bundle.ListPerfilesEmpty}" rendered="#{perfilesController.items.rowCount == 0}"/>
        <h:panelGroup rendered="#{perfilesController.items.rowCount > 0}">
          <h:outputText value="#{perfilesController.pagination.pageFirstItem + 1}..#{perfilesController.pagination.pageLastItem + 1}/#{perfilesController.pagination.itemsCount}"/>&nbsp;
          <h:commandLink action="#{perfilesController.previous}" value="#{bundle.Previous} #{perfilesController.pagination.pageSize}" rendered="#{perfilesController.pagination.hasPreviousPage}"/>&nbsp;
          <h:commandLink action="#{perfilesController.next}" value="#{bundle.Next} #{perfilesController.pagination.pageSize}" rendered="#{perfilesController.pagination.hasNextPage}"/>&nbsp;
          <h:dataTable value="#{perfilesController.items}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
            <h:column>
              <f:facet name="header">
                <h:outputText value="#{bundle.ListPerfilesTitle_id}"/>
              </f:facet>
              <h:outputText value="#{item.id}"/>
            </h:column>
            <h:column>
              <f:facet name="header">
                <h:outputText value="#{bundle.ListPerfilesTitle_descripcion}"/>
              </f:facet>
              <h:outputText value="#{item.descripcion}"/>
            </h:column>
            <h:column>
              <f:facet name="header">
                <h:outputText value="#{bundle.ListPerfilesTitle_estado}"/>
              </f:facet>
              <h:outputText value="#{item.estado}"/>
            </h:column>
            <h:column>
              <f:facet name="header">
                <h:outputText value="&nbsp;"/>
              </f:facet>
              <h:commandLink action="#{perfilesController.prepareView}" value="#{bundle.ListPerfilesViewLink}"/>
              <h:outputText value=" "/>
              <h:commandLink action="#{perfilesController.prepareEdit}" value="#{bundle.ListPerfilesEditLink}"/>
              <h:outputText value=" "/>
              <h:commandLink action="#{perfilesController.destroy}" value="#{bundle.ListPerfilesDestroyLink}"/>
            </h:column>
          </h:dataTable>
        </h:panelGroup>
        <br />
        <h:commandLink class="btn btn-primary btn-sm active" action="#{perfilesController.prepareCreate}" value="#{bundle.ListPerfilesCreateLink}"/>
        <br />
        <br />
        <b:button outcome="/index" value="#{bundle.ListPerfilesIndexLink}" icon="bookmark"> 
        </b:button>
      </h:form>
    </ui:define>
  </ui:composition>

</html>
